<?php
class Privileges_Model_Updateprivilege implements Privileges_Model_Mainable {
    
    private $action_handler;
    private $core_controller_notnull;
    
    public function main(array $variables = null) {
        if(isset($variables['post']['csrf_token']) && ($variables['post']['csrf_token'] == $_SESSION['csrf_token'])){
            $this->core_controller_notnull = new Core_Controller_Notnull;
            $this->core_controller_notnull->main($variables);
            $this->action_handler = new Privileges_Model_Updateprivilegeaction;
            return $this->action_handler->main($variables);
        }
        else {
            $this->action_handler = new Core_Controller_Hackredirect;
            $this->action_handler->main($variables);
        }
    }
}
